package com.java.system.common.entity.admin;

/*import com.joyoung.cloud.security.common.entity.admin.handler.Detail;
import com.joyoung.cloud.security.common.entity.admin.handler.DetailTypeHandler;
import com.joyoung.cloud.security.common.validatedGroup.Add;
import com.joyoung.cloud.security.common.validatedGroup.Modify;*/
import com.java.system.common.entity.admin.handler.Detail;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
/*import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;*/
import lombok.Data;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * 资源表(SysResource)实体类
 *
 * @author makejava
 * @since 2019-06-03 11:01:13
 */
@ApiModel(value = "资源类")
@Data
@Accessors(chain = true)
public class SysResource implements Serializable {
    /*private static final long serialVersionUID = -12875126465000120L;
    //id
    @ApiModelProperty(value = "主键Id")
    @Id
    @Null(message = "{add_id}", groups = {Add.class})
    @NotNull(message = "{modify_id}", groups = {Modify.class})
    private String id;
    //编码
    @ApiModelProperty(value = "编码")
    private String code;
    //名称
    @ApiModelProperty(value = "资源名称")
    @NotBlank(message = "{name_null}")
    @Pattern(regexp = "^[\\s\\S]{1,20}$", message = "{name_rule}")
    private String name;
    //英文名称
    @ApiModelProperty(value = "资源英文名称")
    @Pattern(regexp = "^$|[a-zA-Z\\s]{1,30}$", message = "{enname_rule}")
    private String enName;
    //图标
    @ApiModelProperty(value = "图标")
    private String icon;
    //资源类型:dirct=文件夹，uri=菜单，btn=操作按钮， api = API服务接口
    @ApiModelProperty(value = "资源类型")
    @NotBlank(message = "{menuType_null}")
    private String menuType;
    //链接地址：系统内访问地址
    @ApiModelProperty(value = "资源路径")
    @NotBlank(message = "{href_null}")
    private String href;
    //组件地址:前端页面放置的位置
    @ApiModelProperty(value = "前端组件路径")
    private String component;
    //所属服务：由哪个后端服务提供
    @ApiModelProperty(value = "所属服务名称")
    @NotBlank(message = "{serviceId_null}")
    private String serviceId;
    //应用范围：all = 全部，browser = pc浏览器，webapp = 移动端
    @ApiModelProperty(value = "应用范围")
    private String scop;
    //权限标识：为空时不检测请求权限，不为空时检测
    @ApiModelProperty(value = "权限标识")
    private String permissionCode;
    //请求方式：GET，POST，PUT，DELETE
    @ApiModelProperty(value = "请求方式")
    @NotBlank(message = "{method_null}")
    private String method;
    //是否展示:0=否， 1 = 是
    @ApiModelProperty(value = "是否展示")
    private Boolean isShow;
    //是否禁用:0=否， 1 = 是
    @ApiModelProperty(value = "是否禁用")
    private Boolean isDisable;
    //上级ID
    @ApiModelProperty(value = "父Id")
    private String parentId;
    //路径：id路径，多路径之间用","分割
    @ApiModelProperty(value = "资源Id路径")
    private String path;
    //排序
    @ApiModelProperty(value = "排序值")
    private Integer ordNum;
    //创建时间
    private Date crtTime;
    //创建人id
    private String crtUser;
    //创建人名称
    private String crtName;
    //创建人IP
    private String crtHost;
    //修改时间
    private Date updTime;
    //修改人id
    private String updUser;
    //修改人名称
    private String updName;
    //修改人IP
    private String updHost;
    //删除标识:0=否，1 = 是
    private int delFlag;
    //资源详情
    @ApiModelProperty(value = "资源详情")
    @ColumnType(column = "detail", typeHandler = DetailTypeHandler.class)
    private List<Detail> detail= new LinkedList<Detail>();
    //预留字段
    private String attr2;
    //预留字段
    private String attr1;

    *//*****************************以下为添加字段*********************************//*
    @Transient
    private List<SysResource> children = new LinkedList<SysResource>();


*/

}